<%@ Register TagPrefix="forumsAdmin" TagName="Footer" Src="footer.ascx" %>
<%@ Register TagPrefix="forumsAdmin" TagName="Header" Src="header.ascx" %>
<%@ Page Language="c#" CodeBehind="ManageForumPermissions.aspx.cs" AutoEventWireup="false" Inherits="AspNetForums.Admin.ManageForumPermissions" %>
<%@ Register TagPrefix="Forums" Namespace="AspNetForums.Controls" Assembly="AspNetForums.Controls" %>
<%@ Import Namespace="AspNetForums.Components" %>
<%@ Import Namespace="AspNetForums.Enumerations" %>
<%@ Import Namespace="AspNetForums" %>
<forumsAdmin:Header runat="server" id="Header1" />
		<form runat="server" ID="Form2">
			<span class="forumName"><% = ResourceManager.GetString("ManageForumPermissions_Title") %></span>
			<br>
			<span class="forumThread"><% = ResourceManager.GetString("ManageForumPermissions_SubTitle") %></span>
			<P>
				<table cellspacing="0" cellpadding="4" Class="tableBorder">
					<tr>
						<th class="h1" align="left" colspan="4">
							<% = ResourceManager.GetString("ManageForumPermissions_About") %>
						</th>
					</tr>
					<asp:Repeater EnableViewState="false" runat="server" id="forumGroupRepeater">
						<ItemTemplate>
							<tr>
								<td class="column" width="100%" colspan="4">
									<b>
										<%# DataBinder.Eval(Container.DataItem, "Name") %>
									</b>
								</td>
								<td class="column">
								</td>
							</tr>
							<Forums:ForumRepeater Mode="Administrator" ForumGroupID='<%# DataBinder.Eval(Container.DataItem, "ForumGroupID" ) %>' IgnorePermissions="true" runat="server" ID="Forumrepeater1">
								<ItemTemplate>
									<tr>
										<td class="f">&nbsp;&nbsp;&nbsp;</td>
										<td class="f" width="100%" colspan="2">
											<%# DataBinder.Eval(Container.DataItem, "Name") %>
										</td>
										<td class="f">
										</td>
									</tr>
									<tr>
										<td style="border-bottom: white 1px solid;" class="f">&nbsp;&nbsp;&nbsp;</td>
										<td style="border-bottom: white 1px solid;" class="f">&nbsp;&nbsp;&nbsp;</td>
										<td style="border-bottom: white 1px solid;" class="f" width="100%">
											<Forums:RoleDropDownList id="ddlRoles" runat="server" />
										</td>
										<td style="border-bottom: white 1px solid;" class="f">
											<asp:Button OnClick="AddRole_Click" width="60px"
												CommandName='<%# DataBinder.Eval(Container.DataItem, "ForumID") %>' 
												CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ForumID") %>' 
												Text='<%# AspNetForums.Components.ResourceManager.GetString("Add") %>' 
												runat="Server" ID="Button1" NAME="Button1"></asp:Button>
										</td>
									</tr>
									<Forums:ForumPermissionRepeater ForumID='<%# DataBinder.Eval(Container.DataItem, "ForumID" ) %>' runat="server" ID="ForumPermissionRepeater1">
										<ItemTemplate>
											<tr>
												<td style="border-bottom: white 1px solid;" class="f">&nbsp;&nbsp;&nbsp;</td>
												<td style="border-bottom: white 1px solid;" class="f">&nbsp;&nbsp;&nbsp;</td>
												<td style="border-bottom: white 1px solid;" class="f" width="100%">
													<%# ((int)DataBinder.Eval(Container.DataItem, "RoleID")) > 0  ? "<a href='" + Globals.GetSiteUrls().AdminForumPermissionEdit( ((int)DataBinder.Eval( Container.Parent, "ForumID")), ((int)DataBinder.Eval(Container.DataItem, "RoleID")) ) + "'>" + DataBinder.Eval( Container.DataItem, "Name") + "</a>" : DataBinder.Eval(Container.DataItem, "Name")  %> 
												</td>
												<td style="border-bottom: white 1px solid;" class="f">
													<asp:Button OnClick="RemoveRole_Click" width="60px"
														CommandName='<%# DataBinder.Eval(Container.DataItem, "RoleID") %>' 
														CommandArgument='<%# DataBinder.Eval(Container.Parent, "ForumID") %>' 
														Text='<%# AspNetForums.Components.ResourceManager.GetString("Delete") %>' 
														runat="Server" ID="Button2" NAME="Button2"></asp:Button>
												</td>
											</tr>
										</ItemTemplate>
										<FooterTemplate></FooterTemplate>
										<headertemplate></headertemplate>
									</Forums:ForumPermissionRepeater>
								</ItemTemplate>
								<FooterTemplate></FooterTemplate>
							</Forums:ForumRepeater>
						</ItemTemplate>
						<FooterTemplate>
						</FooterTemplate>
					</asp:Repeater>
				</table>
		</form>
<forumsAdmin:Footer runat="server" id="Footer1" />
